import { defineConfig } from "vitepress";
import basicConfig from "./basic";
import wordpress from "./wordpress.json";
import clang from "./clang.json";

// https://vitepress.dev/reference/site-config
export default defineConfig({
    title: "PHP Study World",
    description: "PHP Study World",
    base: "/study-php",
    themeConfig: {
        nav: [
            { text: "更新日志", link: "/log" },
            { text: "OpenCart", link: "/opencart/" },
            { text: "ThinkPHP", link: "/thinkphp/" },
            { text: "WordPress", link: "/wordpress/" },
            { text: "PHP Extension", link: "/clang/" },
        ],
        sidebar: {
            "/clang/": [
                {
                    text: "基础",
                    items: clang,
                },
            ],
            "/wordpress/": [
                {
                    text: "基础",
                    items: wordpress,
                },
            ],
            "/": basicConfig,
            "/thinkphp/": [
                {
                    text: "基础",
                    items: [
                        { text: "框架介绍", link: "/thinkphp/" },
                        { text: "路由", link: "/thinkphp/router" },
                        { text: "控制器", link: "/thinkphp/controller" },
                    ],
                },
            ],
            "/opencart/": [
                {
                    text: "基础",
                    items: [
                        { text: "介绍", link: "/opencart/" },
                        { text: "控制器", link: "/opencart/controller" },
                        { text: "路由", link: "/opencart/route" },
                        { text: "请求", link: "/opencart/request" },
                        { text: "响应", link: "/opencart/response" },
                        { text: "文档", link: "/opencart/document" },
                        { text: "用户", link: "/opencart/user" },
                        { text: "常用函数", link: "/opencart/functions" },
                        { text: "会话", link: "/opencart/session" },
                        { text: "URL", link: "/opencart/link" },
                        { text: "缓存", link: "/opencart/cache" },
                        { text: "数据库", link: "/opencart/database" },
                        { text: "常量", link: "/opencart/constants" },
                        {
                            text: "API",
                            items: [
                                {
                                    text: "SystemLibraryCartUser",
                                    link: "/opencart/api/system-library-cart-user",
                                },
                            ],
                        },
                    ],
                },
            ],
        },

        socialLinks: [
            { icon: "github", link: "https://github.com/vuejs/vitepress" },
        ],
    },
});
